from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import (QListWidget, QGraphicsOpacityEffect)

class EnhancedPlaylist(QListWidget):
    def __init__(self):
        super().__init__()
        self.setAttribute(Qt.WA_TranslucentBackground)
        self.setStyleSheet("""
            QListView::item {
                padding: 8px;
                border-radius: 8px;
                margin: 4px;
                background: transparent;
            }
            QListWidget::item:hover {
                background: rgba(0,0,0,0.05);
                transform: translateX(4px);
            }
            QListView::item:selected {
                color: rgba(0,0,0,0.8);
                background: rgba(0,120,212,0.1);
                border-left: 3px solid #0078D4;
            }
        """)
        
        # 添加亚克力效果
        self.effect = QGraphicsOpacityEffect()
        self.effect.setOpacity(0.95)
        self.setGraphicsEffect(self.effect)